package com.jprocms.module.cms.api;

import com.jpro.framework.common.pojo.CommonResult;
import com.jprocms.module.cms.api.vo.SiteTenantCreateReqVO;
import com.jprocms.module.cms.enums.ApiConstants;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 站点管理")
public interface SiteApi {

    @PostMapping(value = ApiConstants.PREFIX + "/site/create")
    CommonResult<Long> createSite(@Valid @RequestBody SiteTenantCreateReqVO createReqVO);

    @GetMapping(value = ApiConstants.PREFIX + "/site/generateSitePath")
    CommonResult<String> generateSitePath(@RequestParam("sitePath") String sitePath);

}
